package edu.sctu.zhangwang.month201506.day20150601;

/**
 * Created by user10 on 2015/6/9.
 */
public class StartUtil {
    PeopleAppbean people;
    SetPeopleData setPeopleData;
    BaoGuoDeth baoGuoDeth;

    public StartUtil(){
        people = new PeopleAppbean();
        setPeopleData = new SetPeopleData();
        baoGuoDeth = new BaoGuoDeth(people);
    }
    public void input(PeopleAppbean people){
        if (people.isIs_card()){
            isBaoguo(people);
            get_Price(people);
        }else{

        }
    }
    public void isBaoguo(PeopleAppbean people){
        if (baoGuoDeth.chaBaoGuo()){
            System.out.println("包裹有问题");
        }else{
            isWorter(people);
        }
    }
    public void isWorter(PeopleAppbean people){
        if (baoGuoDeth.chaWater()){
            System.out.println("水有问题");
        }else{

        }
    }
    public void get_Price(PeopleAppbean people){
        if (people.getPice() > 2) {
            System.out.println("进站");

        } else {
            new CardDeth().setPrice(10, people);
            System.out.println("充值成功");
            get_Price(people);
        }
    }
    public void buyTicate(){

    }
}
